package com.hmall.common.util;

/**
 * TODO
 *
 * @Author whx
 * @Date 2024/11/15 20:51
 */
public class ThreadLocalUtil {

    private static ThreadLocal<Long> threadLocal = new ThreadLocal<>();

    public static void setCurrentId(Long id) {
        threadLocal.set(id);
    }

    public static Long getCurrentId() {
        return threadLocal.get();
    }

    public static void removeCurrentId() {
        threadLocal.remove();
    }

}
